<template>
  <div class="ad-input-number">
    <el-input-number :value="value" v-bind="$attrs" @change="handleChange" v-on="$listeners" :controls="false" :min="0"
:precision="$attrs.hasOwnProperty('precision') ? $attrs.precision : 0" :placeholder="$attrs.hasOwnProperty('placeholder') ? $attrs.placeholder : '请输入'" class="money"/>
    <div class="append" v-if="$attrs.hasOwnProperty('append')">{{$attrs.append}}</div>
  </div>
</template>

<script>
export default {
  model: {
    prop: 'value',
    event: 'change'
  },
props: {
  value: {
    type: Number,
  }
},
  methods:{
    handleChange(event){
      this.$emit('input', event)
    }
  }
}
</script>

<style lang="scss" scoped>
.ad-input-number { position: relative; display: flex;
  ::v-deep .el-input--small .el-input__inner { line-height: 30px; }
  .append { position: absolute; right: 8px; }}
</style>